import 'package:get/get.dart';
import 'package:share_fit/app/controllers/home/exercise_records/model/exercise_type.dart';
import 'package:share_fit/app/models/home/date_type_enum.dart';
import 'package:share_fit/app/models/home/workout_model.dart';

class WorkoutRecordsState {
  // 默认选择”所有运动“
  ExerciseType selectedExerciseType = ExerciseType(Type.all, 'assets/images/home/exercise_type_all.png');
  // 运动类型list
  List<ExerciseType> exerciseTypes = [];

  DateType selectedDateType = DateType.day;

  // 日期列表，周，月，年的详细日期
  List<DateTime> dates = [];

  DateTime selectedDate = DateTime.now();

  WorkoutSummary workoutSummary = WorkoutSummary();

  /// 保存有运动记录的日期列表
  Map<DateTime, List<bool>> dateListOfRecord = {};

  ///
  int dateTypeBarIndex = 0;

  WorkoutRecordsState() {
    ///Initialize variables
    exerciseTypes.add(ExerciseType(Type.all, 'assets/images/home/exercise_type_all.png'));
    exerciseTypes.add(ExerciseType(Type.outdoorRunning, 'assets/images/home/exercise_type_outdoor_running.png'));
    exerciseTypes.add(ExerciseType(Type.indoorRunning, 'assets/images/home/exercise_type_running.png'));
    exerciseTypes.add(ExerciseType(Type.walking, 'assets/images/home/exercise_type_walk.png'));
    exerciseTypes.add(ExerciseType(Type.rideBike, 'assets/images/home/exercise_type_riding.png'));
    exerciseTypes.add(ExerciseType(Type.other, 'assets/images/home/exercise_type_other.png'));

    // exerciseTypes.add(ExerciseType.all);
    // exerciseTypes.add(ExerciseType.running);
    // exerciseTypes.add(ExerciseType.indoorRun);
    // exerciseTypes.add(ExerciseType.walking);
    // exerciseTypes.add(ExerciseType.other);
  }
}